/**
 * Created with JetBrains WebStorm.
 * User: kane
 * Date: 13-2-27
 * Time: 下午6:30
 * To change this template use File | Settings | File Templates.
 */
var encrypt = require("../util/encrypt");

exports.test = function(req, res){
    var cmd = "";
    var args = req.body.args;
    if(args){
        // args like : chat:[1,2,"w",{a:1}] 加密后：Y2hhdDpbMSwyLCJ3Iix7YToxfV0=
        cmd = encrypt.base64encode(encrypt.utf16to8(args));
    }else{
        args = "";
    }
    res.render('test', { title: '命令测试',args: args,cmd: cmd});
};